package com.naiterui.ehp.bs.recommend.vo.crm;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * CRM推荐设置
 *
 * @author mudou
 * @since 2.9.0
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class CrmRecomSettingVO implements Serializable {

    /**
     * 审核类型-系统自动
     */
    public static final Integer AUDIT_TYPE_AUTO = 1;
    /**
     * 审核类型-人工
     */
    public static final Integer AUDIT_TYPE_MANUAL = 2;

    public static final Integer SAFE_AUDIT_ON = 1;
    public static final Integer SAFE_AUDIT_OFF = 2;


    /**
     * 推荐是否药师签名：是
     */
    public static final int RECOM_SIGN_ON = 1;
    /**
     * 推荐是否药师签名：否
     */
    public static final int RECOM_SIGN_OFF = 2;

    /**
     * 药师签名是否PIN码：是
     */
    public static final int RECOM_PIN_ON = 1;
    /**
     * 药师签名是否PIN码：否
     */
    public static final int RECOM_PIN_OFF = 2;

    /**
     * 关闭审核自动延时
     */
    public static final int RECOM_DELAY_DEFAULT = 0;

    /**
     * 字段或域定义：<code>serialVersionUID</code>
     */
    private static final long serialVersionUID = 6078810134083735464L;

    // 处方单是否审核-1：否，2：是
    private Integer audit;
    // 自动审核延时-单位：秒
    private Integer delay;
    // 药师是否CA签名-1：否，2：是
    private Integer sign;
    // 是否要求pin码-1：否，2：是
    private Integer pin;
    // 超量处方单是否审核-1：否，2：是
    private Integer safeAudit;

    public CrmRecomSettingVO() {
    }

    public Integer getAudit() {
        return audit;
    }

    public void setAudit(Integer audit) {
        this.audit = audit;
    }

    public Integer getDelay() {
        return delay;
    }

    public void setDelay(Integer delay) {
        this.delay = delay;
    }

    public Integer getSign() {
        return sign;
    }

    public void setSign(Integer sign) {
        this.sign = sign;
    }

    public Integer getPin() {
        return pin;
    }

    public void setPin(Integer pin) {
        this.pin = pin;
    }

    public boolean validate() {
        if (null == this.audit || null == this.pin || null == this.sign) {
            return false;
        }
        if (null == this.delay) {
            this.delay = 0;
        }
        return true;
    }

    public Integer getSafeAudit() {
        return safeAudit;
    }

    public void setSafeAudit(Integer safeAudit) {
        this.safeAudit = safeAudit;
    }


    @Override
    public String toString() {
        return "CrmRecomSettingVO{" +
                "audit=" + audit +
                ", delay=" + delay +
                ", sign=" + sign +
                ", pin=" + pin +
                ", safeAudit=" + safeAudit +
                '}';
    }
}
